Table of Contents
For each system user, VirtualBox stores configuration data in the user's home directory, as per the conventions of the host operating system:
On Windows, this is
%HOMEDRIVE%%HOMEPATH%\.VirtualBox
;
typically something like C:\Documents and
Settings\Username\.VirtualBox
.
On Mac OS X, this is
$HOME/Library/VirtualBox
.
On Unix-like systems (Linux, Solaris), this is
$HOME/.VirtualBox
.
VirtualBox creates this configuration directory automatically, if
necessary. Optionally, you can supply an alternate configuration directory
by setting the
environment variable.VBOX_USER_HOME
VirtualBox stores all its global and machine-specific configuration
data in XML documents. We intentionally do not document the specifications
of these files, as we must reserve the right to modify them in the future.
We therefore strongly suggest that you do not edit these files manually.
VirtualBox provides complete access to its configuration data through its
the VBoxManage
command line tool (see
Chapterá8, VBoxManage reference) and its API (see Chapterá10, VirtualBox programming interfaces).
In the configuration directory,
VirtualBox.xml
is the main configuration
file. This includes global configuration options and the media and virtual
machine registry. The media registry links to all CD/DVD, floppy and disk
images that have been added to the Virtual Disk Manager. For each
registered VM, there is one entry which points to the VM configuration
file, also in XML format.
You can globally change some of the locations where VirtualBox keeps extra configuration and data by selecting "Global settings" from the "File" menu in the VirtualBox main window. Then, in the window that pops up, click on the "General" tab.
Virtual machine settings and files are, by default, saved as
XML files in a subdirectory of the
.VirtualBox/Machines
directory. You
can change the location of this main "Machines" folder in the
"Global settings" dialog.
By default, for each virtual machine, VirtualBox uses another
subdirectory of the "Machines" directory that carries the same name
as the virtual machine. As a result, your virtual machine names must
conform to the conventions of your operating system for valid file
names. For example, a machine called "Fedora 6" would, by default,
have its settings saved in
.VirtualBox/Machines/Fedora 6/Fedora
6.xml
. If you would like more control over the file
names used, you can create the machine using
VBoxManage createvm
with the
-settingsfile
option; see Sectioná8.4, “VBoxManage createvm”.
The virtual machine directory will be renamed if you change
the machine name. If you do not wish this to happen, you can create
the machine using VBoxManage
createvm
with the
-basefolder
option. In this case,
the folder name will never change.
VirtualBox keeps snapshots and saved states in another special
folder for each virtual machine. By default, this is a subfolder of
the virtual machine folder called
Snapshots
-- in our example,
.VirtualBox/Machines/Fedora
6/Snapshots
. You can change this setting for each
machine using VBoxManage
as
well.
VDI container files are, by default, created in the
.VirtualBox/VDI
directory. In
particular, this directory is used when the "Create new virtual
disk" wizard is started to create a new VDI file. Changing this
default is probably most useful if the disk containing your home
directory does not have enough room to hold your VDI files, which
can grow very large.